package com.company.aop.xmldev;

import org.aspectj.lang.ProceedingJoinPoint;

/**
 * @ClassName MyAspect
 * @Description 切面类
 */
public class MyAspect {

    public void before(){
        System.out.println("前置增强方法······");
    }

    /**
     * @param proceedingJoinPoint 连接点（切点）
     */
    public void around(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
        System.out.println("<---······环绕前增强方法······--->");
        // 目标方法
        proceedingJoinPoint.proceed();
        System.out.println("<---······环绕后增强方法······--->");
    }

    public void afterReturn(){
        System.out.println("后置增强方法 ······");
    }

    public void after(){
        System.out.println(" ~ ~ ~ 最终增强方法 ~ ~ ~");
    }

    public void afterThrowing(){
        System.out.println("afterThrowing ··· 异常 ··· ");
    }

}
